Skip to content

fix: resync subscriptions on in_arrear invoice fixed fee#162

Merged
kevcodez merged 4 commits into
mainfrom
k-dog/billing-2606-investigate-stale-current-billing-period-dates-in-orb
Jun 22, 2026
Merged

fix: resync subscriptions on in_arrear invoice fixed fee#162
kevcodez merged 4 commits into
mainfrom
k-dog/billing-2606-investigate-stale-current-billing-period-dates-in-orb

Conversation

@kevcodez

@kevcodez kevcodez commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Orb has no event for billing cycle resets and we previously assumed that fixed fees are always in-advance and update the billing cycle accordingly when we receive an invoice.issued event that contains the new in-advance fee for the next billing cycle.

This is no longer true as we have moved some customers to in-arrear fixed fees where we cannot derive the new billing cycle based on the invoice line items.

I have resynced the affected cases manually. To ensure no stale billing cycles, we now recognise in-arrear fixed fees in invoices and resync the subscription.

Additionally, there is another upcoming case: Free Plan will no longer have any fixed fee, so we cannot rely on the plan line item. We now do a check for outdated billing cycles to catch both cases.

kevcodez added 3 commits June 21, 2026 14:49
Orb has no event for billing cycle resets and we previously assumed that fixed fees are always in-advance and update the billing cycle accordingly when we receive an `invoice.issued` event that contains the new in-advance fee for the next billing cycle.

This is no longer true as we have moved some customers to in-arrear fixed fees where we cannot derive the new billing cycle based on the invoice line items.

I have resynced the affected cases manually. To ensure no stale billing cycles, we now recognise in-arrear fixed fees in invoices and resync the subscription.
@kevcodez kevcodez merged commit 274a935 into main Jun 22, 2026
1 check passed
@kevcodez kevcodez deleted the k-dog/billing-2606-investigate-stale-current-billing-period-dates-in-orb branch June 22, 2026 02:13
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.15.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants